#ifndef INCOMINGPACKET_HPP
#define INCOMINGPACKET_HPP

#include "Packet.hpp"
#include <boost/cstdint.hpp>

namespace kieper {
    class IncomingPacket {
        // friend std::ostream& operator<<(std::ostream& output, const IncomingPacket& incomingpacket);
    public:
        IncomingPacket(char* buffer, unsigned int payloadSize_);
        ~IncomingPacket();
        
        char* getBuffer() const;
        char* getPayload() const;
        
        unsigned int getPayloadSize();
               
        uint32_t getPacketId(); 
        uint16_t getDeviceId();
        
        Packet::Type getType();
        Packet::Delivery getDelivery();
        Packet::Scope getScope();
        Packet::Direction getDirection();

        uint16_t getMessageNumber();
    protected:
    private:
        char* buffer_;
        unsigned int payloadSize_;
        IncomingPacket(const IncomingPacket& other);
        IncomingPacket& operator=(const IncomingPacket& other);
        // void swap(IncomingPacket& other);
    };
}

#endif
